home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsock / maillist / 94-03.Z / 94-03 / text0137.txt < prev    next >
Encoding:
Text File  |  1994-03-30  |  26.1 KB  |  693 lines

  1. Hello there,
  2.  
  3.     I have installed the windows sockets TCP/IP support and I am
  4. experiencing the following problems:
  5.  
  6. 1. When I am running telw.exe which is the telnet for winsock and set the
  7. terminal to vt100 from a UNIX shell using the command, "set term=vt100" and
  8. then run the vi editor then I get a general protection fault error from
  9. windows.....It seems that I cannot set  up the terminal corredctly so that I
  10. can run the vi editor........None of the cursor keys seem to work and none of
  11. the h,j, k, and l keys work so that I can move up down left and right inside
  12. the vi editor.....Can anybody tell me whether there is a new versio that fixes
  13. that problem? Is there any way around it?
  14.  
  15. 2. Also, I would like to get some documentation about this winsock
  16. program...How do you use the programs view.exe, winarchie.exe, winchat.exe
  17. etc....I can run them but I do not seem to be able to do anything with
  18. them......
  19.  
  20. 3. The readme file for the winsock trumpet talks about some debug flags...I am
  21. running on ethernet...The command that I would need to specify in the program
  22. manager item is 
  23.  
  24.         tcpman.exe -debug=ethernet   ?????
  25.  
  26.  
  27.  
  28.     I would very much appreciate any relevant response.
  29.  
  30.     Please e-mail...If anyone is interested in the responses  then please
  31. let me know..I can mail all the  responses I get...
  32.  
  33. Thanks, in advance
  34.  
  35. Chris
  36.  
  37. E-mail Address: christos@kuhub.cc.ukans.edu
  38. From news@bigblue.oit.unc.edu Fri Mar 11 04:11:09 1994
  39. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  40.           id AA07064; Fri, 11 Mar 1994 00:28:26 -0500
  41. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  42.           id AA14050; Fri, 11 Mar 1994 00:04:50 -0500
  43. Received: from GATEWAY by bigblue with netnews
  44.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  45. To: winsock@sunsite.unc.edu
  46. Date: 11 Mar 1994 04:11:09 GMT
  47. From: aburger@hookup.net (aburger)
  48. Message-Id: <2lor0t$pte@nic.hookup.net>
  49. Organization: HookUp Communication Corporation, Waterloo, Ontario, CANADA
  50. Sender: ses
  51. References: <2lb6bb$26r@relay.tor.hookup.net>, <cxy105.12.2D7AD0C6@email.psu.edu>
  52. Subject: Re: Winsock SLIP script
  53.  
  54. In article <cxy105.12.2D7AD0C6@email.psu.edu>, cxy105@email.psu.edu (Chenglung Eric Yen) says:
  55. >
  56. >In article <2lb6bb$26r@relay.tor.hookup.net> aburger@hookup.net (aburger@hookup.net) writes:
  57. >>From: aburger@hookup.net (aburger@hookup.net)
  58. >>Subject: Winsock SLIP script
  59. >>Date: 5 Mar 1994 23:58:35 GMT
  60. >
  61. >>Is there any documentation on how to write Winsock dialing scripts for SLIP users?
  62. >
  63. >Yes, of course there is a document on writing the script for the SLIP dialup.  
  64. >Read the document named install.doc. It should be in your winsock subdirectory.
  65.  
  66. The copy of Winsock I had didn't have the docs..  Strange.  I ended up getting
  67. the new version (v1.0 shareware).
  68.  
  69. Thanks.
  70.  
  71. Alex
  72. From news@bigblue.oit.unc.edu Thu Mar 10 20:59:56 1994
  73. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  74.           id AA07072; Fri, 11 Mar 1994 00:28:27 -0500
  75. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  76.           id AA09445; Fri, 11 Mar 1994 00:05:49 -0500
  77. Received: from GATEWAY by bigblue with netnews
  78.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  79. To: winsock@sunsite.unc.edu
  80. Date: 10 Mar 1994 20:59:56 GMT
  81. From: floydb@rpi.edu
  82. Message-Id: <2lo1oc$m1o@usenet.rpi.edu>
  83. Organization: Rensselaer Polytechnic Institute, Troy, NY
  84. Sender: ses
  85. Subject: Re: nfs client for winsock?
  86.  
  87. In article <2lnmqr$b9f@paperboy.gsfc.nasa.gov> ryan@singollo.gsfc.nasa.gov (Ryan Simmons) writes:
  88. >In article <mark.smith%ccmail.3.000A27C1@x400gw.msfc.nasa.gov>, mark.smith%ccmail@x400gw.msfc.nasa.gov (mark smith) says:
  89. >>
  90. >>I am not sure whether it is possible or not, but I would like to see if there 
  91. >>are any winsock compliant nfs client packages out there.  All of the resources 
  92. >>I have found so far require the nfs client to run at dos time.
  93. >
  94. >(I feel like I'm beginning to sound like an advertisement for NetManage!  Geesh!)
  95. >
  96. >ChameleonNFS provides both an NFS client *and* server.  As I type this I'm nfs-mounted
  97. >to a couple IBM RS6000 machines that are running a pcnfs daemon.  If I want, I can also
  98. >let people mount to my machine the same way.  Those RS6000s are on my desktop (using
  99. >Norton Desktop for Windows) just like any other drive, and I can copy, move, delete, 
  100. >rename, etc., as if all the files were local.  It's great!
  101. >
  102. >Of course, Chameleon is commercial, and if you're looking for public domain or
  103. >shareware, then sorry, I can't help you.
  104. >
  105. >    ___                |ryan@singollo.gsfc.nasa.gov
  106. >   /   )               |rsimmons@gsfcmail.nasa.gov 
  107. >  /__ /     __         |
  108. > /   ) / / / / / )     |CIS 71212,530
  109. >/   (_(_/_(_(_/ (_     |*I got rid of my laptop because my cat was jealous!*
  110. >       /
  111.  
  112.  
  113. Does ChameleonNFS require TSRs before loading Windows? (other than basic network
  114. board drivers -- e.g. NDIS, PKT, ODI, etc.)
  115.  
  116. Where in PC-NFS 5.0 the following commands must be run at the DOS prompt before
  117. loading windows:
  118.  
  119.    NET START RDR PC.IP.name *
  120.    NET SUBNET 255.255.255.0
  121.    NET ROUTE gateway.name
  122.    NET PCNFSD auth.server.name
  123.    NET LOGIN *
  124.  
  125. In ChameleonNFS nothing like this is required?
  126.  
  127. ;-----------------------------------------------------------------------------;
  128. ;       Standard Disclaimer...                                                ;
  129. ;                                                                             ;
  130. ;       Rensselaer Polytechnic Institute -- 110 8th Street -- Troy, NY 12180  ;
  131. ;-----------------------------------------------------------------------------;
  132.  
  133. ***
  134. From news@bigblue.oit.unc.edu Fri Mar 11 02:58:25 1994
  135. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  136.           id AA22256; Fri, 11 Mar 1994 02:58:25 -0500
  137. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  138.           id AA21594; Fri, 11 Mar 1994 02:31:25 -0500
  139. Received: from GATEWAY by bigblue with netnews
  140.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  141. To: winsock@sunsite.unc.edu
  142. Date: Thu, 10 Mar 1994 20:50:28
  143. From: andersen@mink.oit.unc.edu (David B. Andersen)
  144. Message-Id: <andersen.14.0@mink>
  145. Organization: Intel Architecture Labs
  146. Sender: ses
  147. References: <JIM.94Mar9160931@runningbear.edscom>
  148. Subject: Re: Transport Layer Interface (TLI)
  149.  
  150. In article <JIM.94Mar9160931@runningbear.edscom> jim@edscom (Jim Thomas) writes:
  151. >From: jim@edscom (Jim Thomas)
  152. >Subject: Transport Layer Interface (TLI)
  153. >Date: 9 Mar 1994 16:09:36 -0000
  154.  
  155. >Having planned to implement a Winsock based server that was
  156. >to communicate with a Unix box using the BSD socket interface
  157. >I now find that the Unix box is to use a Transport Layer
  158. >Interface (TLI) instead.
  159.  
  160. >Does anybody know if there is a MS-Windows based library or
  161. >support routines (or anything) that can enable the Windows
  162. >applications that I have already written to use TLI.
  163.  
  164. >If not, is there any other way that I could proceed, like
  165. >some kind of protocol conversion in software or hardware.
  166.  
  167. >Thanks in anticipation
  168.  
  169. >Jim Thomas
  170.  
  171. >--
  172. >Jim Thomas, EDS-Scicon Ltd,Wavendon,Wavendon Tower,Milton Keynes,MK17 8LX,UK
  173. >jim@edscom.demon.co.uk   Tel:  +44 908 284522
  174. >Opinions expressed are my own, and are not necessarily those of my employer.
  175.  
  176. You don't really have a problem at all.  Remember that both Winsock and TLI 
  177. are *interfaces* and  not *protocols*.  As long as the protocols remain the 
  178. same (TCP/IP in this case) it doesn't matter what interface each side is 
  179. using.  
  180. =============++=============++=============++=============++====
  181. David B. Andersen             Intel Architecture Labs
  182. andersen@mink.intel.com   or  david_b_andersen@ccm.jf.intel.com
  183. From news@bigblue.oit.unc.edu Fri Mar 11 05:09:39 1994
  184. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  185.           id AA22263; Fri, 11 Mar 1994 02:58:27 -0500
  186. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  187.           id AA19405; Fri, 11 Mar 1994 02:50:41 -0500
  188. Received: from GATEWAY by bigblue with netnews
  189.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  190. To: winsock@sunsite.unc.edu
  191. Date: 11 Mar 1994 05:09:39 GMT
  192. From: ST001255@brownvm.brown.edu (David B. Sussman)
  193. Message-Id: <ST001255-110394000920@cluster-133.cluster.brown.edu>
  194. Organization: Brown University
  195. Sender: ses
  196. Subject: Having a bit of trouble Packet Driver
  197.  
  198. Just got some zip files from  cicia.indiana.edu  
  199. think i got 
  200. winsock.zip
  201. winapps.zip
  202. ws_ftp.zip
  203. Ws_ping.zip
  204. and the trumpet news reader  forgot what it was called..
  205.  
  206. I think I need a slip packet driver to load before my WINPKT driver.. ?  
  207. WHere is it and how do I get it?  DO i have the essential programs for
  208. running slip at this moment?  Please,  any info will help..  
  209. mail to
  210.          ST001255@brownvm.brown.edu
  211. From news@bigblue.oit.unc.edu Fri Mar 11 04:45:02 1994
  212. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  213.           id AA24750; Fri, 11 Mar 1994 03:27:20 -0500
  214. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  215.           id AA19217; Fri, 11 Mar 1994 03:27:12 -0500
  216. Received: from GATEWAY by bigblue with netnews
  217.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  218. To: winsock@sunsite.unc.edu
  219. Date: Fri, 11 Mar 1994 04:45:02 GMT
  220. From: MARK@ardsley.business.uwo.ca (Mark_Bramwell)
  221. Message-Id: <MARK.861.2D7FF74E@ardsley.business.uwo.ca>
  222. Organization: Western Business School
  223. Sender: ses
  224. Subject: winsock telnet with xmodem transfer?
  225.  
  226. I have an outdial modem hooked to a terminal server.
  227.  
  228. I can  telnet into it and command the modem.  That is, if I type  AT [return]
  229. I get 'OK'.  I can also dial out and connect to bbs machines.  I can't 
  230. download any files because I don't have a telnet type of program with file 
  231. transfer (x/y/zmodem).
  232.  
  233. Does such a thing exist?
  234.  
  235.  
  236. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  237. Mark Bramwell, VE3PZR                Located in sunny London, Ontario
  238.  
  239. Internet: Mark@ARDSLEY.business.uwo.ca  IP Address: 129.100.22.33
  240.   Packet:  VE3PZR @ VE3GYQ               UWO Phone: (519) 661-3714
  241. From news@bigblue.oit.unc.edu Fri Mar 11 06:51:37 1994
  242. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  243.           id AA26737; Fri, 11 Mar 1994 03:58:26 -0500
  244. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  245.           id AA27926; Fri, 11 Mar 1994 03:28:56 -0500
  246. Received: from GATEWAY by bigblue with netnews
  247.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  248. To: winsock@sunsite.unc.edu
  249. Date: 11 Mar 1994 06:51:37 GMT
  250. From: babar@vipunen.hut.fi (Anton J Vuorilehto)
  251. Message-Id: <2lp4dp$rsp@nntp.hut.fi>
  252. Organization: Helsinki University of Technology
  253. Sender: ses
  254. References: <1994Mar9.122017.27581@worldbank.org>, <1994Mar9.203047.29915@news.stolaf.edu>, <1994Mar10.131113.13987@worldbank.org>
  255. Reply-To: babar@vipunen.hut.fi (Anton J Vuorilehto)
  256. Subject: Re: Chameleon memory management
  257.  
  258. In article <1994Mar10.131113.13987@worldbank.org> cedwards1@worldbank.org (Charles Edwards) writes:
  259. >In article <1994Mar9.203047.29915@news.stolaf.edu>, hoffmann@stolaf.edu says:
  260. >>     
  261. >>Mime-Version: 1.0
  262. >>Date: Wed, 09 Mar 94 14:25:05 PDT
  263. >>Lines: 18
  264. >>
  265. >>
  266. >>..
  267. >>> for lower memory. Chameleon allocates large blocks of memory in the
  268. >>> first 1MB. When that area is exhausted, Telnet gives the divide by 0
  269. >>> error. You should try to have as much conventional memory as possible
  270. >>> available before starting Windows....etc
  271. >>Charles:
  272. >>Since this is the case, would it make sense to have an include 
  273. >>statement in EMM386 for B000-BFFF since I have a VGA monitor? According 
  274. >>to my books this area is reserved for MDA, CGA, EGA and VGA text.
  275. >>I, like so many others, keep getting GPF's from MAIL.EXE. Do you see
  276. >>a connection with GPF's and the way Chameleon handles lower memory?
  277. >>------------------------------------------------------------
  278. >
  279. >It certainly won't hurt to free up as much conventional memory as possible.
  280. >Unfortunatly, my S3 video uses this area even in VGA mode, so I can't
  281. >allocate it to EMM386. If you can, by all means do so.
  282. >
  283. >I haven't been seeing GPFs myself. Just the divide by 0 in Telnet. And we
  284. >don't use Chameleon mail at my office so I can't address that issue.
  285. >
  286. >There is a very good book called "Windows Internals" that has a chapter
  287. >about Windows' handling of memory. It's actually kind of scary. For
  288. >example, a DLL which has any FIXED segments, either code or data, will
  289. >get that memory allocated as low as possible in the linear memory space.
  290. >Windows will also PageLock these segments, which means they can't be
  291. >swapped out to disk. Very few DLLs actually need to have pagelocked code
  292. >or data and they certainly don't need it in the critical first megabyte.
  293. >But many people don't know about this, and define their data segments
  294. >FIXED in the DEF file. Maybe that's what happened with Chameleon.
  295. >
  296. >Of course, since Chameleon needs to communication with the real-mode NDIS
  297. >driver (I'm assuming you have a direct network connection via an Ethernet
  298. >or Token Ring card) maybe this data DOES have to be in the first megabyte.
  299. >I just wish I could be sure that NetManage is being careful to only
  300. >allocate low memory when absolutely required.
  301. >
  302. >I've spent most of the past 2 weeks investigating Windows memory management,
  303. >primarily because of the issues with Chameleon, and the more I find out,
  304. >the more depressed I become. We're trying to build a store-and-forward
  305. >mail system on top of Chameleon, and exhausting the first megabyte has
  306. >been a major stumbling block. 
  307. >
  308. >********************************************
  309. >* More than half the human beings who have * 
  310. >* ever lived are alive today.              *
  311. >* So the experimental probibility of dying *
  312. >* is less than 50%.                        *
  313. >********************************************
  314.  
  315. Here is a copy of the article containing the win_wrap lower memory
  316. management utility, it even got the sources for it...(for Netmanage
  317. to study?)...
  318. _____________________________________
  319. WIN_WRAP
  320.  
  321.  
  322. A Windows 3.1 program launcher that prevents the client app from 
  323. taking valuable 'low memory'. Kind of like a LOADHI for Windows.
  324.  
  325. Released to the public domain.
  326.  
  327. This posting includes source and uuencoded executable.
  328.  
  329. Short README:
  330. ------------
  331. Have you ever run into the situation where you are trying to 
  332. launch a Windows app, and nothing happens? Perhaps you're out
  333. of memory?
  334.  
  335. You know you have gobs of virtual memory left, and the Program
  336. Manager AboutBox says that you've got 60% resources left. What gives?
  337.  
  338. It's possible that you have run into a little known Windows3.1
  339. roadblock. Perhaps you're out of 'low memory'. This is the precious
  340. memory below the 1 meg line. For an excellent discussion of this
  341. problem, see the article by Matt Pietrek in the Oct/93 issue of
  342. Microsoft Systems Journal.
  343.  
  344. If this is your problem, then a previous application has been loaded
  345. which locked down some low memory. All apps require at least 512 bytes,
  346. but some will take much more if they can. If the app (or apps) have 
  347. taken all the low memory, the Windows will refuse to launch anymore
  348. apps (since it needs the 512 bytes), and will NOT give the user
  349. any indication of what happened (or rather, what didn't happen).
  350.  
  351. If you can identify the offending app (or apps), then you can use
  352. the WIN_WRAP program to launch it. WIN_WRAP will try to force
  353. your app to load itself high in memory.
  354.  
  355. What WIN_WRAP does is: take ALL of the low memory; give back 1k;
  356. launch your app; release back all of the rest of the memory to the system.
  357.  
  358. If your app requires locked memory, it will get it, but ABOVE the
  359. 1 meg line. When WIN_WRAP terminates (immediately after the client
  360. app is launched), the low memory is freed up, so that lots of other
  361. apps can run. 
  362.  
  363. Since WIN_WRAP removes itself almost immediately, you can use it
  364. many times in the same session.
  365.  
  366. I would like to suggest to everyone who is designing system-
  367. status monitors that you include the 'space available below
  368. the 1 meg line' as a valuable system parameter, in the same
  369. league as:
  370.     user/gdi free space
  371.     global memory free space
  372.     disk free space
  373.  
  374. ------
  375. Instead of running 
  376.     RECORDER.EXE textfile.txt
  377. you can run
  378.     WIN_WRAP RECORDER.EXE textfile.txt
  379.  
  380. In the former case, the RECORDER.EXE program will take 3 segments from the 
  381. low memory area:
  382.     the TDB (task database)
  383.     a code segment (about 11k)
  384.     a data segment (about 2.5k)
  385. In the latter case, the RECORDER.EXE program executes properly, but only
  386. takes 1 segment from the low memory area: the TDB. The other two segments
  387. are located in high memory, where there's lots of space.
  388.  
  389. You can put any valid command line after the WIN_WRAP command. These 
  390. compound commands may be put in your Program Manager icons on the 
  391. 'Command Line' entry. (Hit Alt-Enter to view the icon-properties).
  392.  
  393. If you want WIN_WRAP to operate on programs in your Startup group, just
  394. modify the CommandLine entries in the Startup group. I haven't figured 
  395. out how to use WIN_WRAP with the 'load=' and 'run=' options in the WIN.INI.
  396.  
  397. Long README:
  398. -----------
  399.  
  400. Many applications use Windows functions that require 'callbacks'.
  401. A 'callback' is the way that an application can register
  402. itself for notification of system activity. The kind of
  403. 'callback's that I am referring to here are interrupt service code
  404. segments, such as netbios client code, IPX client code, TCP/IP
  405. client code.
  406.     
  407. This code MUST be in memory at all times. The proper way to ensure
  408. that it is in memory is to lock it in place. There are two ways 
  409. to do that.
  410.  
  411. Method 1: Microsoft suggests that this kind of code be written in 
  412. a .DLL, and that the code+data segment be marked as FIXED. At .DLL load
  413. time, Windows will load this code+data 'as low as possible' in the 
  414. Windows memory map (the Windows VM, actually). In a healthy machine,
  415. this will be below the 1meg line. The segments are locked in place and
  416. PageLocked.
  417.  
  418. Method 2: If the code+data to be executed resides in an .EXE file, then
  419. the segments will be loaded high in the Windows memory map, and left
  420. MOVEABLE. The programmer can, however, call GlobalPageLock() to lock
  421. the memory in place. It appears, however, that just before Windows
  422. locks down the memory, it moves it down into low Windows memory, and,
  423. as above, in a healthy machine, this will be below the 1meg line.
  424.  
  425. The memory below the 1meg line is used for many things:
  426.     -DOS for this VM
  427.     -TSR's and device drivers for this VM
  428.     -all GlobalDosAllocs()
  429.     -DPMI buffers for this VM
  430.     -a TDB (Task Data Base) segment, per app
  431. The TDB must be located there, because it has to be accessed by
  432. the Windows app (using a selector) and by DOS (using the equivalent
  433. segment register). Windows will refuse to launch an app if it cannot
  434. get the TDB into low memory.
  435.  
  436. Many apps require locked and PageLocked segments so that they can present
  437. Windows with callback services.
  438.  
  439. You can see that both Method 1 and 2 will push the PageLocked memory as low
  440. as possible, usually into this 'below 1meg' memory.
  441.  
  442. Most often, these segments (code+data) do not need to be in the first 
  443. meg of ram; i.e. they do not need to be accessed from real mode. 
  444.  
  445. The application will allocate these segments using GlobalAlloc()+GlobalPageLock(). 
  446. These segments are the ones that WIN_WRAP will push up high.
  447.  
  448. Sometimes an app WILL require low memory. It will request it from the system
  449. by calling GlobalDosAlloc(). If you try to launch one of these apps with 
  450. WIN_WRAP, the GlobalDosAlloc() will fail, and the program will not launch.
  451. These apps are not appropriate for WIN_WRAP.
  452.  
  453. The type of applications that I have used WIN_WRAP with are netbios
  454. aware apps, TCP/IP client apps and .DLL's and IPX apps. Netbios
  455. buffers may be located above the 1meg line, and IPX buffers can
  456. be as well (if IPX is more recent than 09/92). 
  457.  
  458. To help you visualize the activity of WIN_WRAP, I recommend
  459. the BELOW1M application written by Matt Pietrek. You can also use
  460. HEAPWALK, and sort by address. Look for addresses which start with 000
  461. to indicate blocks below the 1 meg line.
  462.  
  463. The operation of WIN_WRAP is not guaranteed. Use it at your own risk.
  464.  
  465. WIN_WRAP is released to the public domain. As usual, I ask the courtesy
  466. of feedback if you enhance this tool.
  467.  
  468. Pat Beirne
  469. 76475,3640
  470. patb@corel.ca
  471.  
  472.  
  473. ///////////// source follows ////////////////////////////
  474. ///////////// win_wrap.cpp ////////////////////////////
  475. /*SDOC*************************************************************
  476.  
  477.     $Header$
  478.  
  479.     Module: WIN_WRAP
  480.  
  481.     Author:    Pat Beirne
  482.  
  483.     Description: This is a wrapper application that takes one
  484.         parameter on the command line. It then alloc's memory in
  485.         such a way as to force the app to load (mostly) above the
  486.         1 meg line.
  487.  
  488.         It does this by allocating all except 1k of low ram. Then
  489.         it launches the balance of the command line.
  490.         It then frees the allocated memory.
  491.  
  492.         If the slave app needs GlobalPageLock memory, it will take it from
  493.         ABOVE the 1 meg line.
  494.  
  495. *************************************************************EDOC*/
  496.  
  497. /*SDOC*************************************************************
  498.  
  499.   Revision Record
  500.  
  501.     Rev    Date        Auth    Changes
  502.     ===    ====        ====    =======
  503.  
  504.     0.0    10/11/93    pb      start
  505.  
  506. *************************************************************EDOC*/
  507.  
  508.  
  509.  
  510. /*
  511. **
  512. **     Includes
  513. **
  514. */
  515. #define STRICT 1
  516. #include <windows.h>
  517.  
  518. /*::defn
  519. **
  520. **     Defines
  521. **
  522. */
  523.  
  524. /*::end*/
  525.  
  526.  
  527. /*::decl
  528. **
  529. **     Global Variables
  530. **
  531. */
  532.  
  533. /*::end*/
  534.  
  535.  
  536. /*::fnproto
  537. **
  538. **     Function Prototypes
  539. **
  540. */
  541.  
  542. /*::end*/
  543.  
  544.  
  545. /*
  546. **
  547. **     Local Variables
  548. **
  549. */
  550.  
  551. int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmd, int nCmdShow)
  552. {
  553.     HGLOBAL h1;
  554.     DWORD dw;
  555.     WORD segBasic;
  556.     VOID far * pFirst;            // root of the linked list
  557.     VOID far * far *p;
  558.                 
  559.   // allocate a 2k block to give back to the system
  560.   segBasic = LOWORD(GlobalDosAlloc(2048));
  561.   
  562.     // allocate all of the rest of dos memory, 32k at a time
  563.     p = &pFirst;
  564.  
  565.     while(1)
  566.     {
  567.         // allocate all of low dos memory, 32k at a time
  568.         dw = GlobalDosAlloc(0x8000U);
  569.  
  570.         // fill the data into the first WORD of the previous seg, even 
  571.         // if dw==0 (end of list)
  572.         *p = MAKELP(LOWORD(dw),0);
  573.         if (*p==NULL) break;
  574.  
  575.         // form a pointer to the first WORD of the new seg
  576.         p = (VOID far * far *)*p;
  577.     }
  578.  
  579.     // repeat, alloc 2k at a time
  580.     while (1)
  581.     {
  582.          dw = GlobalDosAlloc(2048);
  583.          *p = MAKELP(LOWORD(dw),0);
  584.          if (*p==NULL) break;
  585.          p = (VOID far * far *)*p;
  586.     }
  587.                  
  588.     // now we have exhausted low ram; give back one small segment
  589.     if (segBasic) GlobalDosFree(segBasic);
  590.  
  591.     // launch the client app     
  592.     int nRet = 
  593.         WinExec(lpCmd,nCmdShow);
  594.     
  595.     // give the client app time to settle-in
  596.     MSG m;
  597.     PeekMessage(&m,NULL,NULL,NULL,PM_NOREMOVE);
  598.  
  599.   //////////////////////////////////////////////////////////////////////
  600.   // we can now release the list back to the system
  601.   // free the dos memory
  602.   
  603.   // point to the start of the list
  604.   p = (VOID far * far *) pFirst;
  605.   while (p)
  606.   {
  607.       // keep the pointer to next (walking pointer)
  608.       pFirst = *p;
  609.       // free the block
  610.     GlobalDosFree(HIWORD(p));
  611.     // point to next
  612.     p = (VOID far * far *) pFirst;
  613.    } 
  614.       
  615.  
  616.   return nRet;
  617. }
  618.  
  619. ///////////// win_wrap.def ////////////////////////////
  620. NAME WIN_WRAP
  621. DESCRIPTION "Wrapper Application to Force High Load"
  622. EXETYPE Windows
  623. STUB "winstub.exe"
  624. HEAPSIZE 1024
  625.  
  626. [ Section: 1/1  File: WW.ZIP  Encoder: Wincode v1.5 ]
  627. Original Input File Size: 2436
  628.  
  629. begin 644 WW.ZIP
  630. M4$L#!!0`!``(`+A;:QN_8QC1"@D``"`1```,````5TE.7U=205`N15A%[5=]
  631. M;!/G&7_N;)\=AQB+!8.ZXAPL-=\9Q,7=1/@(*(9`2)QDV'R$9"$QX-+$J7V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[2*M;M\WE]J((G#MN"
  680. M=`7-.)5\WE.V$[\<'ZKIE+B*IR?&+?5MY^6@?G0Y67&Y,(Z1K2A%-_A]6N8N
  681. MYWUN%#\`O$G@XROG<YX*=SP$B]TDER5=ML)BX+=%Y?;Y55ZL`NOGJZJ\/DY)
  682. M&"7E[G+907QRGU3H<;Q_`5!+`0(4`!0`!``(`+A;:QN_8QC1"@D``"`1```,
  683. M````````````(`````````!724Y?5U)!4"Y%6$502P4&``````$``0`Z````
  684. &-`D`````
  685. `
  686. end
  687.  
  688. [ Section: 1/1  File: WW.ZIP  Encoder: Wincode v1.5 ]
  689.  
  690.  
  691.  
  692.  
  693.